<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<%@ include file="/WEB-INF/views/shared/taglib.jsp"%>

<div>
	<div class="tab-container" data-id="claim-container" id="claim-tab">
			<ul class="tab tab-horizontal teamShareUl" style="">
				<li data-id="tab1" class="active" data-category="one">
					<span>
						一代分享
						<span class="weui-badge" style="font-size:14px;background-color:#2196F3;">${oneTeamShareCount}</span>
					</span>
				</li>
				<li data-id="tab2" class="" data-category="two">
					<span>
						二代分享
						<span class="weui-badge" style="font-size:14px;background-color:#2196F3;">${twoTeamShareCount}</span>
					</span>
				</li>
			</ul>
	</div>
		
	<div id="claim-container">
			<div class="tab-content active" id="tab1">
				
			</div>
			<div class="tab-content" id="tab2">
				
			</div>
	</div>
</div>
<%@ include file="/WEB-INF/views/shared/scripts/tabmob.jsp"%>
<script type="text/javascript">
	$(function(){
		liChange();
		$(".teamShareUl li").on("click",function(){
			liChange();
		});
	});
	
	function liChange(){
		var $li=$(".teamShareUl li.active");
		
		if($li.attr("data-oneload")=="true"){
			return;
		}
		
		var userId=$("#userId").val();
		var forId=$li.data("id")
		var category=$li.data("category");
		
		var url=$.getVirtualPath()+"/wechat/cust/personCenter/teamShare?category="+category+"&id="+userId;
		var html=$.getText(url);
		
		$("#"+forId).html(html);
		
		$li.attr("data-oneload","true");
	}
	
</script>
